package com.example.yjhticket.controller;


import com.example.common.vo.Result;
import com.example.yjhticket.entity.Tickets;
import com.example.yjhticket.mapper.TicketsMapper;
import com.example.yjhticket.service.ITicketsService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 廖老师
 * @since 2023-07-19
 */
@RestController
@RequestMapping("/yjhticket/tickets")
public class TicketsController {
    @Resource
    TicketsMapper ticketsMapper;
    @RequestMapping("selectTicket")
    public Result selectTicket(){
        return Result.success("查询成功",ticketsMapper.selectWithVenues());
    }


    @RequestMapping("getByid")
    public Result getTicketById(String id){
        return Result.success("OK",ticketsMapper.selectWithVenuesById(id));
    }
}

